package com.dyna.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.dyna.bean.CommonsResult;
import com.dyna.bean.Payment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RateLimitController {
    @GetMapping("/rateLimit/customerBlockHandler")
    @SentinelResource(value = "customerBlockHandler",
            blockHandlerClass = CustomerBlockHandler.class, blockHandler = "handleException2")
    public CommonsResult customerBlockHandler()
    {
        return new CommonsResult(200,"按客户自定义限流处理逻辑");
    }
}
